package com.cdl;


import java.util.*;

public class Demo {
    /**
     * 姓名
     */
    private int age;

    /**
     * main 方法作为程序入口
     *
     * @param args 参数
     */
    public  static  void main(String[] args){

        //Date date = new Date();
        //
        //System.out.println(date.toString());
        //
        //LocalDate localDate = LocalDate.now();
        //
        //
        //
        //System.out.println(localDate.toString());
        //System.out.println(localDate.getDayOfWeek().toString());
        //System.out.println(localDate.getDayOfMonth());
        //System.out.println(localDate.getDayOfYear());
        //System.out.println(localDate.getMonth().toString());

        //Employee[] staff = new Employee[3];
        //
        //
        //
        //staff[0] =new Employee("Carl Cracker",75000,1987,12,15);
        //staff[1] =new Employee("Harry Hacker",50000,1989,11,12);
        //staff[2] =new Employee("Tony Tester",4000,1980,5,22);
        //
        //for (Employee employee : staff){
        //    employee.raiseSalary(5);
        //
        //}
        //
        //for (Employee employee : staff)
        //    System.out.println("name=" + employee.getName() + ",salary=" + employee.getSalary() +",hireDay=" + employee.getHireDay());

        //InitBlockA[] initBlockAS = new InitBlockA[3];
        //
        //initBlockAS[0] = new InitBlockA();
        //initBlockAS[1] = new InitBlockA();
        //initBlockAS[2] = new InitBlockA();
        //
        //for (InitBlockA initBlockA : initBlockAS){
        //    System.out.println(initBlockA.getName());
        //}

        //Scanner reader = new Scanner(System.in);
        //System.out.println("Enter a number");
        //
        //int number = reader.nextInt();
        //
        //System.out.println("you entered: " + number);

       // int first = 10;
       // int second =20;
       //
       // System.out.println("输入两个数字：" + first + " " + second);
       // int sum = first + second;
       //
       // System.out.println("总和：" + sum);

        // long startTime = System.currentTimeMillis();
        // String s = "";
        //
        // for (int i = 0; i < 100000; i++) {
        //     s= s + "a";
        // }
        //
        //
        // long endTime = System.currentTimeMillis();
        // System.out.println(endTime-startTime);

        //long startTime = System.currentTimeMillis();
        //StringBuilder s = new StringBuilder();
        //
        //for (int i = 0; i < 100000; i++) {
        //    s.append("a");
        //
        //}
        //s.deleteCharAt(s.length()-1);
        //
        //
        //long endTime = System.currentTimeMillis();
        //System.out.println(endTime-startTime);

        //List<String> list = new ArrayList<String>();
        //
        //list.add("1");
        //list.add("2");
        //list.add("3");
        //
        //String s = list.get(0);
        //System.out.println(s);
        //
        //
        //Set<Integer> set = new HashSet<Integer>();
        //set.add(111);
        //set.add(-2);
        //set.add(32);
        //set.add(434);
        //Iterator<Integer> iterator = set.iterator();
        //while (iterator.hasNext()){
        //    Integer value = iterator.next();
        //    System.out.println(value);
        //}
        //
        //Map<String,Long> map = new HashMap<String, Long>() ;
        //map.put("a",1L);
        //map.put("b",2L);
        //map.put("c",3L);
        //map.put("d",4L);
        //map.put("e",5L);
        //map.put("f",6L);
        //map.put("g",7L);
        //map.put("h",8L);
        //
        //Long age = map.get("a");
        //System.out.println(age);


        MagicItem<String> wand = new MagicWand("aaa");
        MagicItem<String> ring = new MagicRing("bb");
        MagicItem<Double> potion = new MagicPotion("cc");

        wand.use("ddd");
        System.out.println("ddd"+wand.getDescription());











    }
}
